package rhc.taskSchedule.entity;

import java.util.Date;
import java.util.List;

import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

/**任务类，关联上任务类型和任务调度
 * @author lenovo1
 *
 */
@Document(collection="distribute_task")
public class Task extends AbstractEntity{

	public static final String COLUMN_TASK_NAME="task_name";
	public static final String COLUMN_TASK_TYPE_ID="task_type_id";
	public static final String COLUMN_SOURCE_TASK_ID="source_task_id";
	public static final String COLUMN_RUN_COUNT="run_count";
	public static final String COLUMN_CREATE_DATE="create_date";
	public static final String COLUMN_UPDATE_DATE="update_date";
	public static final String COLUMN_BEFORE_RUN_DATE="before_run_date";
	public static final String COLUMN_RUN_NODE_NUMBER="run_node_number";
	
	/**
	 * 任务名
	 */
	@Field(value=COLUMN_TASK_NAME)
	private String taskName;
	
	/**
	 * 任务类型id
	 */
	@Field(value=COLUMN_TASK_TYPE_ID)
	private String taskTypeId;
	
	/**
	 * 源任务id
	 */
	@Field(value=COLUMN_SOURCE_TASK_ID)
	private String sourceTaskId;
	
	/**
	 * 运行次数
	 */
	@Field(value=COLUMN_RUN_COUNT)
	private int runCount;
	
	/**
	 * 创建时间
	 */
	@Field(value=COLUMN_CREATE_DATE)
	private Date createDate;
	
	/**
	 * 更新时间
	 */
	@Field(value=COLUMN_UPDATE_DATE)
	private Date updateDate;
	
	/**
	 * 上次运行时间
	 */
	@Field(value=COLUMN_BEFORE_RUN_DATE)
	private Date beforeRunDate;
	
	/**
	 * 同时运行任务节点数量
	 */
	@Field(value=COLUMN_RUN_NODE_NUMBER)
	private int runNodeNumber;

	public String getTaskName() {
		return taskName;
	}

	public void setTaskName(String taskName) {
		this.taskName = taskName;
	}

	public String getTaskTypeId() {
		return taskTypeId;
	}

	public void setTaskTypeId(String taskTypeId) {
		this.taskTypeId = taskTypeId;
	}

	public String getSourceTaskId() {
		return sourceTaskId;
	}

	public void setSourceTaskId(String sourceTaskId) {
		this.sourceTaskId = sourceTaskId;
	}

	public int getRunCount() {
		return runCount;
	}

	public void setRunCount(int runCount) {
		this.runCount = runCount;
	}

	public Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	public Date getUpdateDate() {
		return updateDate;
	}

	public void setUpdateDate(Date updateDate) {
		this.updateDate = updateDate;
	}

	public Date getBeforeRunDate() {
		return beforeRunDate;
	}

	public void setBeforeRunDate(Date beforeRunDate) {
		this.beforeRunDate = beforeRunDate;
	}

	public int getRunNodeNumber() {
		return runNodeNumber;
	}

	public void setRunNodeNumber(int runNodeNumber) {
		this.runNodeNumber = runNodeNumber;
	}

	
}
